home *** CD-ROM | disk | FTP | other *** search
/ Building Homes of Our Own / Building Homes of our Own.iso / setup / data1.cab / Everything / working / houCons.dxr / interface_801_InteriorsInset Behave.ls < prev    next >
Encoding:
Text File  |  2002-09-25  |  903 b   |  43 lines

  1. property mySprite, myLoc, myMember, myType, purchased
  2.  
  3. on beginSprite me
  4.   mySprite = me.spriteNum
  5.   myLoc = the loc of sprite mySprite
  6.   myType = #IntInset
  7.   hide(me)
  8. end
  9.  
  10. on hide me
  11.   set the loc of sprite mySprite to point(-10000, -10000)
  12. end
  13.  
  14. on show me, showWhich
  15.   put "InsetSprite got <show> with <showwhich> = " && showWhich && "and the frame =" && the frame
  16.   showWhich = string(showWhich)
  17.   showWhich = showWhich & "_inset"
  18.   if the number of member showWhich = -1 then
  19.     showWhich = "generic_inset"
  20.   end if
  21.   set the member of sprite mySprite to member(showWhich)
  22.   myMember = member(showWhich)
  23.   set the loc of sprite mySprite to myLoc
  24. end
  25.  
  26. on KillInteriorInset me
  27.   hide(me)
  28. end
  29.  
  30. on sendSpriteNum me, whichType
  31.   if whichType = me.myType then
  32.     return mySprite
  33.   end if
  34. end
  35.  
  36. on insetShowing me
  37.   if the loc of sprite mySprite = myLoc then
  38.     return 1
  39.   else
  40.     return 0
  41.   end if
  42. end
  43.